package action.chap12;

import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class Demo02 {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();

        LocalDateTime localDateTime = now.plusDays(-1);
        LocalDateTime localDateTime1 = now.minusDays(2);
        LocalDate localDate = localDateTime1.toLocalDate();
        LocalTime localTime = localDateTime1.toLocalTime();
        System.out.println(localDate);
        System.out.println(localTime);

        Instant instant = Instant.ofEpochSecond(3);
        System.out.println(instant);
    }
}
